package com.ruoyi.project.mydy.movieapply.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.movieapply.mapper.DlMovieApplyMapper;
import com.ruoyi.project.mydy.movieapply.domain.DlMovieApply;
import com.ruoyi.project.mydy.movieapply.service.IDlMovieApplyService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 影片审核申请记录Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlMovieApplyServiceImpl implements IDlMovieApplyService 
{
    @Autowired
    private DlMovieApplyMapper dlMovieApplyMapper;

    /**
     * 查询影片审核申请记录
     * 
     * @param id 影片审核申请记录主键
     * @return 影片审核申请记录
     */
    @Override
    public DlMovieApply selectDlMovieApplyById(Long id)
    {
        return dlMovieApplyMapper.selectDlMovieApplyById(id);
    }

    /**
     * 查询影片审核申请记录列表
     * 
     * @param dlMovieApply 影片审核申请记录
     * @return 影片审核申请记录
     */
    @Override
    public List<DlMovieApply> selectDlMovieApplyList(DlMovieApply dlMovieApply)
    {
        return dlMovieApplyMapper.selectDlMovieApplyList(dlMovieApply);
    }

    /**
     * 新增影片审核申请记录
     * 
     * @param dlMovieApply 影片审核申请记录
     * @return 结果
     */
    @Override
    public int insertDlMovieApply(DlMovieApply dlMovieApply)
    {
        dlMovieApply.setCreateTime(DateUtils.getNowDate());
        return dlMovieApplyMapper.insertDlMovieApply(dlMovieApply);
    }

    /**
     * 修改影片审核申请记录
     * 
     * @param dlMovieApply 影片审核申请记录
     * @return 结果
     */
    @Override
    public int updateDlMovieApply(DlMovieApply dlMovieApply)
    {
        return dlMovieApplyMapper.updateDlMovieApply(dlMovieApply);
    }

    /**
     * 批量删除影片审核申请记录
     * 
     * @param ids 需要删除的影片审核申请记录主键
     * @return 结果
     */
    @Override
    public int deleteDlMovieApplyByIds(String ids)
    {
        return dlMovieApplyMapper.deleteDlMovieApplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除影片审核申请记录信息
     * 
     * @param id 影片审核申请记录主键
     * @return 结果
     */
    @Override
    public int deleteDlMovieApplyById(Long id)
    {
        return dlMovieApplyMapper.deleteDlMovieApplyById(id);
    }
}
